package com.lzq.model.prototype;

/**
 * @author : modify
 * @version : v1.0
 * @description :
 * @createTime : 2022/11/15 14:43
 * @updateUser : modify
 * @updateTime : 2022/11/15 14:43
 * @updateRemark :
 */
public class RealizeType implements Cloneable {
    public RealizeType() {
        System.out.println("new RealizeType");
    }

    @Override
    public RealizeType clone() {
        try {
            System.out.println("clone success");
            return (RealizeType) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new AssertionError();
        }
    }
}

class RealizeTypeTest {
    public static void main(String[] args) {
        RealizeType r1 = new RealizeType();
        RealizeType r2 = r1.clone();
        System.out.println(r1 == r2);
    }
}